<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>获取一个 SNMP 对象</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.snmpget" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">snmpget</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">snmpget</span> &mdash; <span class="dc-title">获取一个 SNMP 对象</span></p>

 </div>
 <div class="refsect1 unknown-seealsp" id="refsect1-function.snmpget-unknown-seealsp">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>snmpget</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$hostname</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$community</code></span>
   , <span class="methodparam"><span class="type">string</span> <code class="parameter">$object_id</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$timeout</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$retries</code></span>
  ]] ) : <span class="type">string</span></div>


  <p class="para rdfs-comment">
   成功则返回 SNMP 的对象值，失败则返回 <strong><code>FALSE</code></strong>。
  </p>  

  <p class="para">
   函数 <span class="function"><strong>snmpget()</strong></span> 用于读取由
   <code class="parameter">object_id</code> 指定的 SNMP
   对象值。<code class="parameter">hostname</code> 指定
   SNMP 代理，而 <code class="parameter">community</code>
   参数指定具有读权限的域的名字。
  </p>

  <p class="para">
   <div class="informalexample">
    <div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$syscontact&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">snmpget</span><span style="color: #007700">(</span><span style="color: #DD0000">"127.0.0.1"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"public"</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"system.SysContact.0"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
    </div>

   </div>
  </p>
 </div>

</div></div></div></body></html>